
<?php
include("../autoload.php");
$codvisita = $_GET['codvisita'];
$tipo = $_GET['tipo'];
$visitas = Util::RetornaArquivos($codvisita, $tipo);
?>
<div onclick="alteraDisplayDiv('divConteudoDescricao');" style="float:right;position:relative;width:80px;height:20px;background-image:url(img/fechar.png);cursor:pointer;"></div>
<div style="left:35px;top:20px;float:left;position:relative;width:300px;min-height:100px;">
    <?php
    if ($visitas == false) {
        echo "Nenhum Arquivo publicado.";
    } else {
        if ($tipo == "jpg") {
            foreach ($visitas as $value) {
                ?>
                <img width="70" style="cursor:pointer;" onclick="lightfoto('arquivos/<?php echo $value->arquivo; ?>')" height="70" src="arquivos/<?php echo $value->arquivo; ?>" />
                <?php
            }
        } else {
            foreach ($visitas as $value) {
                ?>
                <a class ="pdf" href="arquivos/<?php echo $value->arquivo; ?>" target="_blank"
                   ><?php echo $value->arquivo; ?></a>
                <br>
                <?php
            }
        }
    }
    ?>

</div>
